/*
 * @Author: majianwen
 * @Date: 2021-02-09 21:19:26
 * @LastEditors: majianwen
 * @LastEditTime: 2021-02-09 21:19:35
 * @FilePath: \vue3-vite-app\jest.config.js
 * @Description: jest配置
 */

module.exports = {
  testEnvironment: 'jsdom',
  transform: {
    '^.+\\.vue$': 'vue-jest',
    '^.+\\js$': 'babel-jest',
  },
  moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node'],
  testMatch: ['**/tests/**/*.spec.js', '**/__tests__/**/*.spec.js'],
  moduleNameMapper: {
    '^main(.*)$': '<rootDir>/src$1',
  },
};
